/***************** Modification History ***********************************
   @doc
   @module TRT.c - Transaction Requirement Table maintenance functions |
   @end
   
$Log: /SoftPay/SPK2SIM/Source/Config/trt.c $ 
**************************************************************************

   Copyright (C) 1999 by VeriFone, Inc.

   All rights reserved.  No part of this software may be reproduced,
   transmitted, transcribed, stored in a retrieval system, or translated
   into any language or computer language, in any form or by any means,
   electronic, mechanical, magnetic, optical, chemical, manual or otherwise,
   without the prior written permission of VeriFone, Inc.

---------------------------------------------------------------------------*/
#include <project.h>

#include <aclconio.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <aclstr.h>
#include <acdce.h>
#include <applidl.h>
#include <svctxo.h>
#include <string.h>

/** /#define DEBUG_VSTRT*/
#ifdef DEBUG_VSTRT
#define DEBUG_95
#endif

#include <define.h>
#include <transact.h>
#include <print.h>
#include <trt.h>
#include <msg.h>
#include <msgfuncs.h>
#include <confio.h>
#include <hdt.h>
#include <ztconf.h>
#include <spdebug.h>
#include <form.h>
#include <form2.h>
#include <mem.h>
#include <list.h>
#include <report.h>
#include <pscalls.h>
#include <cdt.h>
#include <cst.h>
#include <mht.h>
#include <test.h>
#include <gds.h>

/*-------------------------------------------------------------------------
    Function :    inLoadTRTRec
    Description : Loads local buffer with contents of specified TRT.
    Parameters :
    Returns :     if successful TRT Record Index
                   on error      ERR_FOPEN  - File open error
                                 ERR_FREAD  - File read error
                                 ERR_FCLOSE - File close error
    Globals :
    Notes :
--------------------------------------------------------------------------*/

int inLoadTRTRec(TRANSACTION_OBJECT* pobTran,int inTranCode) {
    char szFileName[FILENAME_SIZE + 1];
    int inRetVal = VS_ERR;
    int inResult;
    int inTRTRecNum = 0;  /* init index to first TRT record */
    FHANDLE hTRTFHandle;
    char stVerInfo[GEN_VER_SIZE];

    /** /pdebug (("--inLoadTRTRec--"));*/
    strcpy(szFileName, szGetTRTFileName());
    //    if ( srGDS.fHandHeld )
    //        strcat(szFileName, ".dhh");
    //    else
    strcat(szFileName, ".dat");
    hTRTFHandle = open(szFileName, O_RDWR);

    if (hTRTFHandle < 0)
        return(VS_ERR);

    /* Skip GENDATA version header information */
    if (read(hTRTFHandle, stVerInfo, GEN_VER_SIZE) != GEN_VER_SIZE) {
        close(hTRTFHandle);
        return(VS_ERR);
    }

    do {
        inResult = read(hTRTFHandle, (char *) &(pobTran->srTRTRec), SIZE_TRT_REC);
        if (inResult == 0)
            break;                           /* End of file reached */
        if (inResult != SIZE_TRT_REC)        /* or even result = -1 */ {
            inRetVal = VS_ERR;
            break;          /* Read error, get out */
        }
        if (pobTran->srTRTRec.TransactionCode == inTranCode) {
            inRetVal = VS_SUCCESS;
            break;
        }
        ++inTRTRecNum;
    } while (1);
    close(hTRTFHandle);

    return((inRetVal == VS_SUCCESS) ? inTRTRecNum : inRetVal);
}

int inSaveTRTRec(TRANSACTION_OBJECT* pobTran,int inTranCode) {
    char szFileName[FILENAME_SIZE + 1];
    int inRetVal;

    /** /pdebug (("--inSaveTRTRec--"));*/
    strcpy(szFileName, szGetTRTFileName());
    //    if ( srGDS.fHandHeld )
    //        strcat(szFileName, ".dhh");
    //    else
    strcat(szFileName, ".dat");
    inRetVal = inSaveConfRec(szFileName, SIZE_TRT_REC, inTranCode, (char *) &(pobTran->srTRTRec));

    return(inRetVal);
}

/********************************************************************************************* 
* @func short | shGetTransactionCode | 
*       Get TRT Record Field inTransactionCode
*
* @parm int    |  TRT Record Field inTransactionCode    |
*
* @end
**********************************************************************************************/

short shGetTransactionCode(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.TransactionCode;
}

/********************************************************************************************* 
* @func void | vdSetTransactionCode | 
*       Set TRT Record Field inTransactionCode
*
* @parm int    |  TRT Record Field inTransactionCode    |
*
* @end
**********************************************************************************************/

void vdSetTransactionCode(TRANSACTION_OBJECT* pobTran,short param) {
    pobTran->srTRTRec.TransactionCode = param;
}
/********************************************************************************************* 
* @func short | shGetTranType | 
*       Get TRT Record Field inTranType
*
* @parm int    |  TRT Record Field inTranType   |
*
* @end
**********************************************************************************************/

short shGetTranType(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.TranType;
}

/********************************************************************************************* 
* @func void | vdSetTranType | 
*       Set TRT Record Field inTranType
*
* @parm int    |  TRT Record Field inTranType   |
*
* @end
**********************************************************************************************/

void vdSetTranType(TRANSACTION_OBJECT* pobTran,short param) {
    pobTran->srTRTRec.TranType = param;
}
/********************************************************************************************* 
* @func short | shGetCardMode | 
*       Get TRT Record Field inCardMode
*
* @parm int    |  TRT Record Field inCardMode   |
*
* @end
**********************************************************************************************/

short shGetCardMode(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.CardMode;
}

/********************************************************************************************* 
* @func void | vdSetCardMode | 
*       Set TRT Record Field inCardMode
*
* @parm int    |  TRT Record Field inCardMode   |
*
* @end
**********************************************************************************************/

void vdSetCardMode(TRANSACTION_OBJECT* pobTran,short param) {
    pobTran->srTRTRec.CardMode = param;
}

/********************************************************************************************* 
* @func short | shGetTipProc | 
*       Get TRT Record Field inCardMode
*
* @parm int    |  TRT Record Field inCardMode   |
*
* @end
**********************************************************************************************/

short shGetTipProc(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.TipProc;
}

/********************************************************************************************* 
* @func void | vdSetCardMode | 
*       Set TRT Record Field inCardMode
*
* @parm int    |  TRT Record Field inCardMode   |
*
* @end
**********************************************************************************************/

void vdSetTipProc(TRANSACTION_OBJECT* pobTran,short param) {
    pobTran->srTRTRec.TipProc = param;
}

/********************************************************************************************* 
* @func char* | szGetTranAbbrev | 
*       Get TRT Record Field szTranAbbrev
*
* @parm char*    |  TRT Record Field szTranAbbrev   |
*
* @end
**********************************************************************************************/

char* szGetTranAbbrev(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.TranAbbrev;
}

/********************************************************************************************* 
* @func void | vdSetTranAbbrev | 
*       Set TRT Record Field szTranAbbrev
*
* @parm char*    |  TRT Record Field szTranAbbrev   |
*
* @end
**********************************************************************************************/

void vdSetTranAbbrev(TRANSACTION_OBJECT* pobTran,char* param) {
    strlcpy(pobTran->srTRTRec.TranAbbrev, param, sizeof(pobTran->srTRTRec.TranAbbrev));
}
/********************************************************************************************* 
* @func int | uiGetBannedCardTypes | 
*       Get TRT Record Field uiBannedCardTypes
*
* @parm int    |  TRT Record Field uiBannedCardTypes    |
*
* @end
**********************************************************************************************/

short shGetBannedCardTypes(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.BannedCardTypes;
}

/********************************************************************************************* 
* @func void | vdSetBannedCardTypes | 
*       Set TRT Record Field uiBannedCardTypes
*
* @parm int    |  TRT Record Field uiBannedCardTypes    |
*
* @end
**********************************************************************************************/

void vdSetBannedCardTypes(TRANSACTION_OBJECT* pobTran,short param) {
    pobTran->srTRTRec.BannedCardTypes = param;
}
/********************************************************************************************* 
* @func VS_BOOL | fGetAdjustIncInvNum | 
*       Get TRT Record Field fAdjustIncInvNum
*
* @parm VS_BOOL    |  TRT Record Field fAdjustIncInvNum |
*
* @end
**********************************************************************************************/

VS_BOOL fGetAdjustIncInvNum(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.AdjustIncInvNum;
}

/********************************************************************************************* 
* @func void | vdSetAdjustIncInvNum | 
*       Set TRT Record Field fAdjustIncInvNum
*
* @parm VS_BOOL    |  TRT Record Field fAdjustIncInvNum |
*
* @end
**********************************************************************************************/

void vdSetAdjustIncInvNum(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.AdjustIncInvNum = param;
}
/********************************************************************************************* 
* @func VS_BOOL | fGetIncInvNum | 
*       Get TRT Record Field fIncInvNum
*
* @parm VS_BOOL    |  TRT Record Field fIncInvNum   |
*
* @end
**********************************************************************************************/

VS_BOOL fGetIncInvNum(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.IncInvNum;
}

/********************************************************************************************* 
* @func void | vdSetIncInvNum | 
*       Set TRT Record Field fIncInvNum
*
* @parm VS_BOOL    |  TRT Record Field fIncInvNum   |
*
* @end
**********************************************************************************************/

void vdSetIncInvNum(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.IncInvNum = param;
}
/********************************************************************************************* 
* @func VS_BOOL | fGetVoidOffline | 
*       Get TRT Record Field fVoidOffline
*
* @parm VS_BOOL    |  TRT Record Field fVoidOffline |
*
* @end
**********************************************************************************************/

VS_BOOL fGetVoidOffline(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.VoidOffline;
}

/********************************************************************************************* 
* @func void | vdSetVoidOffline | 
*       Set TRT Record Field fVoidOffline
*
* @parm VS_BOOL    |  TRT Record Field fVoidOffline |
*
* @end
**********************************************************************************************/

void vdSetVoidOffline(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.VoidOffline = param;
}
/********************************************************************************************* 
* @func VS_BOOL | fGetAdjustOffline | 
*       Get TRT Record Field fAdjustOffline
*
* @parm VS_BOOL    |  TRT Record Field fAdjustOffline   |
*
* @end
**********************************************************************************************/

VS_BOOL fGetAdjustOffline(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.AdjustOffline;
}

/********************************************************************************************* 
* @func void | vdSetAdjustOffline | 
*       Set TRT Record Field fAdjustOffline
*
* @parm VS_BOOL    |  TRT Record Field fAdjustOffline   |
*
* @end
**********************************************************************************************/

void vdSetAdjustOffline(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.AdjustOffline = param;
}
/********************************************************************************************* 
* @func VS_BOOL | fGetVoidReceipt | 
*       Get TRT Record Field fVoidReceipt
*
* @parm VS_BOOL    |  TRT Record Field fVoidReceipt |
*
* @end
**********************************************************************************************/

VS_BOOL fGetVoidReceipt(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.VoidReceipt;
}

/********************************************************************************************* 
* @func void | vdSetVoidReceipt | 
*       Set TRT Record Field fVoidReceipt
*
* @parm VS_BOOL    |  TRT Record Field fVoidReceipt |
*
* @end
**********************************************************************************************/

void vdSetVoidReceipt(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.VoidReceipt = param;
}
/********************************************************************************************* 
* @func VS_BOOL | fGetAdjustReceipt | 
*       Get TRT Record Field fAdjustReceipt
*
* @parm VS_BOOL    |  TRT Record Field fAdjustReceipt   |
*
* @end
**********************************************************************************************/

VS_BOOL fGetAdjustReceipt(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.AdjustReceipt;
}

/********************************************************************************************* 
* @func void | vdSetAdjustReceipt | 
*       Set TRT Record Field fAdjustReceipt
*
* @parm VS_BOOL    |  TRT Record Field fAdjustReceipt   |
*
* @end
**********************************************************************************************/

void vdSetAdjustReceipt(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.AdjustReceipt = param;
}
/********************************************************************************************* 
* @func VS_BOOL | fGetPrintReceipt | 
*       Get TRT Record Field fPrintReceipt
*
* @parm VS_BOOL    |  TRT Record Field fPrintReceipt    |
*
* @end
**********************************************************************************************/

/*VS_BOOL   fGetPrintReceipt(TRANSACTION_OBJECT *pobTran)
{
        return pobTran->srTRTRec.PrintReceipt;
}*/

/********************************************************************************************* 
* @func VS_BOOL | fGetVoidAllowed | 
*       Get TRT Record Field fVoidAllowed
*
* @parm VS_BOOL    |  TRT Record Field fVoidAllowed |
*
* @end
**********************************************************************************************/

VS_BOOL fGetVoidAllowed(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.VoidAllowed;
}

/********************************************************************************************* 
* @func void | vdSetVoidAllowed | 
*       Set TRT Record Field fVoidAllowed
*
* @parm VS_BOOL    |  TRT Record Field fVoidAllowed |
*
* @end
**********************************************************************************************/

void vdSetVoidAllowed(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.VoidAllowed = param;
}
/********************************************************************************************* 
* @func VS_BOOL | fGetAdjustAllowed | 
*       Get TRT Record Field fAdjustAllowed
*
* @parm VS_BOOL    |  TRT Record Field fAdjustAllowed   |
*
* @end
**********************************************************************************************/

VS_BOOL fGetAdjustAllowed(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.AdjustAllowed;
}

/********************************************************************************************* 
* @func void | vdSetAdjustAllowed | 
*       Set TRT Record Field fAdjustAllowed
*
* @parm VS_BOOL    |  TRT Record Field fAdjustAllowed   |
*
* @end
**********************************************************************************************/

void vdSetAdjustAllowed(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.AdjustAllowed = param;
}
/********************************************************************************************* 
* @func VS_BOOL | fGetAllowed | 
*       Get TRT Record Field fAllowed
*
* @parm VS_BOOL    |  TRT Record Field fAllowed |
*
* @end
**********************************************************************************************/

VS_BOOL fGetAllowed(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.Allowed;
}

/********************************************************************************************* 
* @func void | vdSetAllowed | 
*       Set TRT Record Field fAllowed
*
* @parm VS_BOOL    |  TRT Record Field fAllowed |
*
* @end
**********************************************************************************************/

void vdSetAllowed(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.Allowed = param;
}
/********************************************************************************************* 
* @func VS_BOOL | fGetCheckFloorLimit | 
*       Get TRT Record Field fCheckFloorLimit
*
* @parm VS_BOOL    |  TRT Record Field fCheckFloorLimit |
*
* @end
**********************************************************************************************/

/*VS_BOOL   fGetCheckFloorLimit(TRANSACTION_OBJECT *pobTran)
{
        return pobTran->srTRTRec.CheckFloorLimit;
}*/

/********************************************************************************************* 
* @func VS_BOOL | fGetDataCapture | 
*       Get TRT Record Field fDataCapture
*
* @parm VS_BOOL    |  TRT Record Field fDataCapture |
*
* @end
**********************************************************************************************/

VS_BOOL fGetDataCapture(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.DataCapture;
}

/********************************************************************************************* 
* @func void | vdSetDataCapture | 
*       Set TRT Record Field fDataCapture
*
* @parm VS_BOOL    |  TRT Record Field fDataCapture |
*
* @end
**********************************************************************************************/

void vdSetDataCapture(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.DataCapture = param;
}

/********************************************************************************************* 
* @func VS_BOOL | fGetVoidIncHostInvNum | 
*       Get TRT Record Field fVoidIncHostInvNum
*
* @parm VS_BOOL    |  TRT Record Field fVoidIncHostInvNum   |
*
* @end
**********************************************************************************************/

VS_BOOL fGetVoidIncHostInvNum(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.VoidIncHostInvNum;
}

/********************************************************************************************* 
* @func void | vdSetVoidIncHostInvNum | 
*       Set TRT Record Field fVoidIncHostInvNum
*
* @parm VS_BOOL    |  TRT Record Field fVoidIncHostInvNum   |
*
* @end
**********************************************************************************************/

void vdSetVoidIncHostInvNum(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.VoidIncHostInvNum = param;
}
/********************************************************************************************* 
* @func VS_BOOL | fGetAdjustIncHostInvNum | 
*       Get TRT Record Field fAdjustIncHostInvNum
*
* @parm VS_BOOL    |  TRT Record Field fAdjustIncHostInvNum |
*
* @end
**********************************************************************************************/

VS_BOOL fGetAdjustIncHostInvNum(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.AdjustIncHostInvNum;
}

/********************************************************************************************* 
* @func void | vdSetAdjustIncHostInvNum | 
*       Set TRT Record Field fAdjustIncHostInvNum
*
* @parm VS_BOOL    |  TRT Record Field fAdjustIncHostInvNum |
*
* @end
**********************************************************************************************/

void vdSetAdjustIncHostInvNum(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.AdjustIncHostInvNum = param;
}
/********************************************************************************************* 
* @func VS_BOOL | fGetIncHostInvNum | 
*       Get TRT Record Field fIncHostInvNum
*
* @parm VS_BOOL    |  TRT Record Field fIncHostInvNum   |
*
* @end
**********************************************************************************************/

VS_BOOL fGetIncHostInvNum(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.IncHostInvNum;
}

/********************************************************************************************* 
* @func void | vdSetIncHostInvNum | 
*       Set TRT Record Field fIncHostInvNum
*
* @parm VS_BOOL    |  TRT Record Field fIncHostInvNum   |
*
* @end
**********************************************************************************************/

void vdSetIncHostInvNum(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.IncHostInvNum = param;
}
/********************************************************************************************* 
* @func VS_BOOL | fGetVoidIncInvNum | 
*       Get TRT Record Field fVoidIncInvNum
*
* @parm VS_BOOL    |  TRT Record Field fVoidIncInvNum   |
*
* @end
**********************************************************************************************/

VS_BOOL fGetVoidIncInvNum(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.VoidIncInvNum;
}

/********************************************************************************************* 
* @func void | vdSetVoidIncInvNum | 
*       Set TRT Record Field fVoidIncInvNum
*
* @parm VS_BOOL    |  TRT Record Field fVoidIncInvNum   |
*
* @end
**********************************************************************************************/

void vdSetVoidIncInvNum(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.VoidIncInvNum = param;
}

/********************************************************************************************* 
* @func VS_BOOL | fGetTRTOverage | 
*       Get TRT Record Field fOverage
*
* @parm VS_BOOL    |  TRT Record Field fOverage |
*
* @end
**********************************************************************************************/

VS_BOOL fGetOverage(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.Overage;
}

/********************************************************************************************* 
* @func void | vdSetOverage | 
*       Set TRT Record Field fOverage
*
* @parm VS_BOOL    |  TRT Record Field fOverage |
*
* @end
**********************************************************************************************/

void vdSetOverage(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.Overage = param;
}


/********************************************************************************************* 
* @func VS_BOOL | fGetCheckFloorLimit | 
*       Get TRT Record Field fCheckFloorLimit
*
* @parm VS_BOOL    |  TRT Record Field fCheckFloorLimit |
*
* @end
**********************************************************************************************/

VS_BOOL fGetCheckFloorLimit(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.CheckFloorLimit;
}

/********************************************************************************************* 
* @func void | vdSetTRTCheckFloorLimit | 
*       Set TRT Record Field fCheckFloorLimit
*
* @parm VS_BOOL    |  TRT Record Field fCheckFloorLimit |
*
* @end
**********************************************************************************************/

void vdSetCheckFloorLimit(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.CheckFloorLimit = param;
}

/********************************************************************************************* 
* @func VS_BOOL | fGetTRTReversal | 
*       Get TRT Record Field fReversal
*
* @parm VS_BOOL    |  TRT Record Field fReversal    |
*
* @end
**********************************************************************************************/

VS_BOOL fGetReversal(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.Reversal;
}

/********************************************************************************************* 
* @func void | vdSetTRTReversal | 
*       Set TRT Record Field fReversal
*
* @parm VS_BOOL    |  TRT Record Field fReversal    |
*
* @end
**********************************************************************************************/

void vdSetReversal(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.Reversal = param;
}



/********************************************************************************************* 
* @func VS_BOOL | fGetTRTPrintReceipt | 
*       Get TRT Record Field fPrintReceipt
*
* @parm VS_BOOL    |  TRT Record Field fPrintReceipt    |
*
* @end
**********************************************************************************************/

VS_BOOL fGetPrintReceipt(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.PrintReceipt;
}

/********************************************************************************************* 
* @func void | vdSetTRTPrintReceipt | 
*       Set TRT Record Field fPrintReceipt
*
* @parm VS_BOOL    |  TRT Record Field fPrintReceipt    |
*
* @end
**********************************************************************************************/

void vdSetPrintReceipt(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.PrintReceipt = param;
}

/********************************************************************************************* 
* @func VS_BOOL | fGetTRTOffline | 
*       Get TRT Record Field fOffline
*
* @parm VS_BOOL    |  TRT Record Field fOffline |
*
* @end
**********************************************************************************************/

VS_BOOL fGetOffline(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.Offline;
}

/********************************************************************************************* 
* @func void | fGetTRTPrintReceipt | 
*       Set TRT Record Field fOffline
*
* @parm VS_BOOL    |  TRT Record Field fOffline |
*
* @end
**********************************************************************************************/

void vdSetOffline(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.Offline = param;
}


/********************************************************************************************* 
* @func VS_BOOL | fGetNotUsed1 | 
*       Get TRT Record Field fNotUsed1
*
* @parm VS_BOOL    |  TRT Record Field fNotUsed1    |
*
* @end
**********************************************************************************************/

VS_BOOL fGetNotUsed1(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.NotUsed1;
}

/********************************************************************************************* 
* @func void | vdSetNotUsed1 | 
*       Set TRT Record Field fNotUsed1
*
* @parm VS_BOOL    |  TRT Record Field fNotUsed1    |
*
* @end
**********************************************************************************************/

void vdSetNotUsed1(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.NotUsed1 = param;
}

/********************************************************************************************* 
* @func VS_BOOL | fGetNotUsed2 | 
*       Get TRT Record Field fNotUsed2
*
* @parm VS_BOOL    |  TRT Record Field fNotUsed2    |
*
* @end
**********************************************************************************************/

VS_BOOL fGetNotUsed2(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.NotUsed2;
}

/********************************************************************************************* 
* @func void | vdSetNotUsed2 | 
*       Set TRT Record Field fNotUsed2
*
* @parm VS_BOOL    |  TRT Record Field fNotUsed2    |
*
* @end
**********************************************************************************************/

void vdSetNotUsed2(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.NotUsed2 = param;
}


/********************************************************************************************* 
* @func VS_BOOL | fGetNotUsed3 | 
*       Get TRT Record Field fNotUsed3
*
* @parm VS_BOOL    |  TRT Record Field fNotUsed3    |
*
* @end
**********************************************************************************************/

VS_BOOL fGetNotUsed3(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.NotUsed3;
}

/********************************************************************************************* 
* @func void | vdSetNotUsed3 | 
*       Set TRT Record Field fNotUsed3
*
* @parm VS_BOOL    |  TRT Record Field fNotUsed3    |
*
* @end
**********************************************************************************************/

void vdSetNotUsed3(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.NotUsed3 = param;
}

/********************************************************************************************* 
* @func VS_BOOL | fGetNotUsed4 | 
*       Get TRT Record Field fNotUsed4
*
* @parm VS_BOOL    |  TRT Record Field fNotUsed4    |
*
* @end
**********************************************************************************************/

VS_BOOL fGetNotUsed4(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.NotUsed4;
}

/********************************************************************************************* 
* @func void | vdSetNotUsed4 | 
*       Set TRT Record Field fNotUsed4
*
* @parm VS_BOOL    |  TRT Record Field fNotUsed4    |
*
* @end
**********************************************************************************************/

void vdSetNotUsed4(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.NotUsed4 = param;
}

/********************************************************************************************* 
* @func VS_BOOL | fGetNotUsed4 | 
*       Get TRT Record Field fNotUsed4
*
* @parm VS_BOOL    |  TRT Record Field fNotUsed4    |
*
* @end
**********************************************************************************************/

VS_BOOL fGetRetryPrompt(TRANSACTION_OBJECT* pobTran) {
    return pobTran->srTRTRec.RetryPrompt;
}

/********************************************************************************************* 
* @func void | vdSetNotUsed4 | 
*       Set TRT Record Field fNotUsed4
*
* @parm VS_BOOL    |  TRT Record Field fNotUsed4    |
*
* @end
**********************************************************************************************/

void vdSetRetryPrompt(TRANSACTION_OBJECT* pobTran,VS_BOOL param) {
    pobTran->srTRTRec.RetryPrompt = param;
}
